<!-- 使用 type="home" 属性设置首页，其他页面不需要设置，默认为page；推荐使用json5，更强大，且允许注释 -->
<route lang="json5">
  {
    style: {
      navigationBarTitleText: '已提现',
      "enablePullDownRefresh": false,
    },
  }
  </route>
<template>
  <view>
    <view class="p-4">
      <k-list :loading="loading" :is-empty="!data.length">
        <view class="py-[20rpx] border-b border-b-solid border-[#EDEDED]" v-for="item in data" :key="item">
          <view class="flex items-center justify-between text-[#333]">
            <text class="text-[30rpx]">{{ item.type_desc }}</text>
            <text class="text-[40rpx]">{{ item.money }}</text>
          </view>
          <view class="flex items-center justify-between text-[#999999] text-sm mt-[20rpx]">
            <text>{{ item.create_time }}</text>
            <text :class="{ 'text-base': item.status != 1 }">{{ item.status_desc }}</text>
          </view>
        </view>
      </k-list>

    </view>
  </view>
</template>

<script setup>
import { fetchWithdrawRecord } from "@/service/withdraw";
import useReachBottomLoadMore from "@/hooks/useReachBottomLoadMore";

const { data, loading, refresh } = useReachBottomLoadMore(fetchWithdrawRecord);

onLoad(() => {
  refresh();
});

</script>

<style lang="scss" scoped></style>
